

/* First created by JCasGen Mon Mar 28 12:51:52 CEST 2011 */
package ia1011.zanzibar.chaos.type;

import org.apache.uima.jcas.JCas; 
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.cas.TOP_Type;

import org.apache.uima.jcas.cas.FSArray;


/** A Lemma represents an morphosyntactic and semantic interpretation (generally obtained in a dictionary) of a token or a token span.
 * Updated by JCasGen Mon Mar 28 12:52:46 CEST 2011
 * XML source: /home/berardino/universita/IA/progetti_IA/Zanzibar/desc/Chaos/TypeSystemDescriptors/ChaosUimaTypeSystem.xml
 * @generated */
public class UimaComplexConstituent extends UimaConstituent {
  /** @generated
   * @ordered 
   */
  public final static int typeIndexID = JCasRegistry.register(UimaComplexConstituent.class);
  /** @generated
   * @ordered 
   */
  public final static int type = typeIndexID;
  /** @generated  */
  public              int getTypeIndexID() {return typeIndexID;}
 
  /** Never called.  Disable default constructor
   * @generated */
  protected UimaComplexConstituent() {}
    
  /** Internal - constructor used by generator 
   * @generated */
  public UimaComplexConstituent(int addr, TOP_Type type) {
    super(addr, type);
    readObject();
  }
  
  /** @generated */
  public UimaComplexConstituent(JCas jcas) {
    super(jcas);
    readObject();   
  } 

  /** @generated */  
  public UimaComplexConstituent(JCas jcas, int begin, int end) {
    super(jcas);
    setBegin(begin);
    setEnd(end);
    readObject();
  }   

  /** <!-- begin-user-doc -->
    * Write your own initialization here
    * <!-- end-user-doc -->
  @generated modifiable */
  private void readObject() {}
     
 
    
  //*--------------*
  //* Feature: subconstituents

  /** getter for subconstituents - gets 
   * @generated */
  public FSArray getSubconstituents() {
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_subconstituents == null)
      jcasType.jcas.throwFeatMissing("subconstituents", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_subconstituents)));}
    
  /** setter for subconstituents - sets  
   * @generated */
  public void setSubconstituents(FSArray v) {
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_subconstituents == null)
      jcasType.jcas.throwFeatMissing("subconstituents", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_subconstituents, jcasType.ll_cas.ll_getFSRef(v));}    
    
  /** indexed getter for subconstituents - gets an indexed value - 
   * @generated */
  public UimaConstituent getSubconstituents(int i) {
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_subconstituents == null)
      jcasType.jcas.throwFeatMissing("subconstituents", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_subconstituents), i);
    return (UimaConstituent)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_subconstituents), i)));}

  /** indexed setter for subconstituents - sets an indexed value - 
   * @generated */
  public void setSubconstituents(int i, UimaConstituent v) { 
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_subconstituents == null)
      jcasType.jcas.throwFeatMissing("subconstituents", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_subconstituents), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_subconstituents), i, jcasType.ll_cas.ll_getFSRef(v));}
   
    
  //*--------------*
  //* Feature: head

  /** getter for head - gets 
   * @generated */
  public UimaConstituent getHead() {
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_head == null)
      jcasType.jcas.throwFeatMissing("head", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    return (UimaConstituent)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_head)));}
    
  /** setter for head - sets  
   * @generated */
  public void setHead(UimaConstituent v) {
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_head == null)
      jcasType.jcas.throwFeatMissing("head", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_head, jcasType.ll_cas.ll_getFSRef(v));}    
   
    
  //*--------------*
  //* Feature: governor

  /** getter for governor - gets 
   * @generated */
  public UimaConstituent getGovernor() {
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_governor == null)
      jcasType.jcas.throwFeatMissing("governor", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    return (UimaConstituent)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_governor)));}
    
  /** setter for governor - sets  
   * @generated */
  public void setGovernor(UimaConstituent v) {
    if (UimaComplexConstituent_Type.featOkTst && ((UimaComplexConstituent_Type)jcasType).casFeat_governor == null)
      jcasType.jcas.throwFeatMissing("governor", "ia1011.zanzibar.chaos.type.UimaComplexConstituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((UimaComplexConstituent_Type)jcasType).casFeatCode_governor, jcasType.ll_cas.ll_getFSRef(v));}    
  }

    